#include <iostream>
using namespace std;

class A{
	private:
		int x,y;
	public:
		A(int a,int b){
			x=a;
			y=b;
		}
		void Do(){
			cout<<"x="<<x<<"  y="<<y<<endl;
		}
};

class B{
	private:
		A *pa;
	public:
		B(A *t){
			pa=t;
		}
		void Do(){
			pa->Do(); 
		}
};

int main(void){
	A * pa=new A(3,5);
	B * pb=new B(pa);
	pb->Do();
	delete pa;
	delete pb;
	return 0;
}
